/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bmf.rest;

import javax.ejb.Stateless;
import java.util.List;
import javax.ejb.EJB;
import javax.ejb.Stateless;
import javax.ws.rs.core.*;
import javax.ws.rs.*;
/**
 *
 * @author Tony_
 */
@Path("nodes")
@Stateless
public class nResource {

   @Context
    @EJB
    private nManagerLocal nManagerLocal;
    
    
    @GET
    @Produces({MediaType.TEXT_XML})
    public List<Node> getIds() {
      List<Node> l=nManagerLocal.getNodes();
      
      return l;
    }
        /*@GET
	@Produces( { MediaType.TEXT_XML })
	public List<Node> getNodesBrowser() {
		Node test=new Node();
                test.setGroup(new Group("1","default"));
                test.setId("9");
                test.setSensorBoardName("Light");
                Node test1=new Node();
                test.setGroup(new Group("1","default"));
                test.setId("8");
                test.setSensorBoardName("Temperature");
                List<Node> nodes = new ArrayList<Node>();
                nodes.add(test);
                nodes.add(test1);
               
                return nodes;
	}*/

}
